package PTA.Mianxiangduixiang.ex37;

import java.util.Scanner;

class BankAccount{
    int balance;

    public BankAccount() {
        balance=0;
    }

    public BankAccount(int balance) {
        this.balance = balance;
    }
    public int getBlance(){
        return balance;
    }
    public int withdrae(int amount){
       this.balance-=amount;
        return this.balance;
    }
    public int deposit(int amount){
        this.balance+=amount;
        return this.balance;
    }
}
public class ex37 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);

int a = sc.nextInt();
int b =sc.nextInt();
int c = sc.nextInt();
        BankAccount m = new BankAccount(a);
        System.out.println(m.getBlance());
        System.out.println(m.withdrae(b));
        System.out.println(m.deposit(c));
    }
}
